#pragma once

#include "GameObj.h"
#include "Bullet.h"
#include <hgeanim.h>
#include <string>

class EnermyObj : public GameObj
{
public:
	EnermyObj(hgeAnimation *enermy,hgeSprite *bullet,float x,float y,float time,int hp,std::string script,int bulletType);
	virtual ~EnermyObj();
	virtual void Update();
	virtual void Render();
	virtual hgeRect* getCollision(hgeRect* rect);
	int checkCollision(hgeRect* rect);
	int MakeDmg(int dmg);
	void MoveTo(float x,float y);
	bool isClear();
	void Fire(float par);
	float getX(){return m_x;}
	float getY(){return m_y;}
	float getLastFireTime(){return m_lastfiretime;}
	void clearBullet();
protected:
	hgeAnimation *m_enermy;
	hgeSprite *m_bullet;
	BulletManager m_bullMan;
	std::string m_conScript;
	bool m_clear;//need clear
	float m_x,m_y;
	float m_lastfiretime;
	int m_hp,m_bulletType;
	float m_time;
	int m_score;
};